#ifndef PY_EDITOR_EXTENSION_HPP
#define PY_EDITOR_EXTENSION_HPP

#include "scripting/scripting_api.h"
#include "py_base.hpp"

class PythonEditorScript : public IEditorScript, PyScriptBase
{
public:
    PythonEditorScript(EditorTarget type, std::string title, const std::string &script_path);
    ~PythonEditorScript();
    void execute(const void* node) override;
    static IScript* create(EditorTarget target, std::string title, std::string_view code, const std::string &script_path);

private:
    bool compile(const std::string_view& code);
};

#endif /* PY_EDITOR_EXTENSION_HPP */
